Optimal. Leaf size=254 \[ -\frac {i a^{4/3} x}{2^{2/3}}-\frac {\sqrt {3} a^{4/3} \text {ArcTan}\left (\frac {\sqrt [3]{a}+2 \sqrt [3]{a+i a \tan (c+d x)}}{\sqrt {3} \sqrt [3]{a}}\right )}{d}+\frac {\sqrt [3]{2} \sqrt {3} a^{4/3} \text {ArcTan}\left (\frac {\sqrt [3]{a}+2^{2/3} \sqrt [3]{a+i a \tan (c+d x)}}{\sqrt {3} \sqrt [3]{a}}\right )}{d}-\frac {a^{4/3} \log (\cos (c+d x))}{2^{2/3} d}-\frac {a^{4/3} \log (\tan (c+d x))}{2 d}+\frac {3 a^{4/3} \log \left (\sqrt [3]{a}-\sqrt [3]{a+i a \tan (c+d x)}\right )}{2 d}-\frac {3 a^{4/3} \log \left (\sqrt [3]{2} \sqrt [3]{a}-\sqrt [3]{a+i a \tan (c+d x)}\right )}{2^{2/3} d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.31, antiderivative size = 254, normalized size of antiderivative = 1.00, number of steps
used = 13, number of rules used = 9, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.375, Rules used = {3643, 3559,
3562, 59, 631, 210, 31, 3675, 3680} \begin {gather*} -\frac {\sqrt {3} a^{4/3} \text {ArcTan}\left (\frac {\sqrt [3]{a}+2 \sqrt [3]{a+i a \tan (c+d x)}}{\sqrt {3} \sqrt [3]{a}}\right )}{d}+\frac {\sqrt [3]{2} \sqrt {3} a^{4/3} \text {ArcTan}\left (\frac {\sqrt [3]{a}+2^{2/3} \sqrt [3]{a+i a \tan (c+d x)}}{\sqrt {3} \sqrt [3]{a}}\right )}{d}-\frac {a^{4/3} \log (\tan (c+d x))}{2 d}+\frac {3 a^{4/3} \log \left (\sqrt [3]{a}-\sqrt [3]{a+i a \tan (c+d x)}\right )}{2 d}-\frac {3 a^{4/3} \log \left (\sqrt [3]{2} \sqrt [3]{a}-\sqrt [3]{a+i a \tan (c+d x)}\right )}{2^{2/3} d}-\frac {a^{4/3} \log (\cos (c+d x))}{2^{2/3} d}-\frac {i a^{4/3} x}{2^{2/3}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 59
Rule 210
Rule 631
Rule 3559
Rule 3562
Rule 3643
Rule 3675
Rule 3680
Rubi steps
\begin {align*} \int \cot (c+d x) (a+i a \tan (c+d x))^{4/3} \, dx &=i \int (a+i a \tan (c+d x))^{4/3} \, dx-\frac {i \int \cot (c+d x) (a+i a \tan (c+d x))^{4/3} (i a+a \tan (c+d x)) \, dx}{a}\\ &=-\frac {(3 i) \int \cot (c+d x) \sqrt [3]{a+i a \tan (c+d x)} \left (\frac {i a^2}{3}+\frac {1}{3} a^2 \tan (c+d x)\right ) \, dx}{a}+(2 i a) \int \sqrt [3]{a+i a \tan (c+d x)} \, dx\\ &=\frac {a^2 \text {Subst}\left (\int \frac {1}{x (a+i a x)^{2/3}} \, dx,x,\tan (c+d x)\right )}{d}+\frac {\left (2 a^2\right ) \text {Subst}\left (\int \frac {1}{(a-x) (a+x)^{2/3}} \, dx,x,i a \tan (c+d x)\right )}{d}\\ &=-\frac {i a^{4/3} x}{2^{2/3}}-\frac {a^{4/3} \log (\cos (c+d x))}{2^{2/3} d}-\frac {a^{4/3} \log (\tan (c+d x))}{2 d}-\frac {\left (3 a^{4/3}\right ) \text {Subst}\left (\int \frac {1}{\sqrt [3]{a}-x} \, dx,x,\sqrt [3]{a+i a \tan (c+d x)}\right )}{2 d}+\frac {\left (3 a^{4/3}\right ) \text {Subst}\left (\int \frac {1}{\sqrt [3]{2} \sqrt [3]{a}-x} \, dx,x,\sqrt [3]{a+i a \tan (c+d x)}\right )}{2^{2/3} d}-\frac {\left (3 a^{5/3}\right ) \text {Subst}\left (\int \frac {1}{a^{2/3}+\sqrt [3]{a} x+x^2} \, dx,x,\sqrt [3]{a+i a \tan (c+d x)}\right )}{2 d}+\frac {\left (3 a^{5/3}\right ) \text {Subst}\left (\int \frac {1}{2^{2/3} a^{2/3}+\sqrt [3]{2} \sqrt [3]{a} x+x^2} \, dx,x,\sqrt [3]{a+i a \tan (c+d x)}\right )}{\sqrt [3]{2} d}\\ &=-\frac {i a^{4/3} x}{2^{2/3}}-\frac {a^{4/3} \log (\cos (c+d x))}{2^{2/3} d}-\frac {a^{4/3} \log (\tan (c+d x))}{2 d}+\frac {3 a^{4/3} \log \left (\sqrt [3]{a}-\sqrt [3]{a+i a \tan (c+d x)}\right )}{2 d}-\frac {3 a^{4/3} \log \left (\sqrt [3]{2} \sqrt [3]{a}-\sqrt [3]{a+i a \tan (c+d x)}\right )}{2^{2/3} d}+\frac {\left (3 a^{4/3}\right ) \text {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,1+\frac {2 \sqrt [3]{a+i a \tan (c+d x)}}{\sqrt [3]{a}}\right )}{d}-\frac {\left (3 \sqrt [3]{2} a^{4/3}\right ) \text {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,1+\frac {2^{2/3} \sqrt [3]{a+i a \tan (c+d x)}}{\sqrt [3]{a}}\right )}{d}\\ &=-\frac {i a^{4/3} x}{2^{2/3}}-\frac {\sqrt {3} a^{4/3} \tan ^{-1}\left (\frac {1+\frac {2 \sqrt [3]{a+i a \tan (c+d x)}}{\sqrt [3]{a}}}{\sqrt {3}}\right )}{d}+\frac {\sqrt [3]{2} \sqrt {3} a^{4/3} \tan ^{-1}\left (\frac {1+\frac {2^{2/3} \sqrt [3]{a+i a \tan (c+d x)}}{\sqrt [3]{a}}}{\sqrt {3}}\right )}{d}-\frac {a^{4/3} \log (\cos (c+d x))}{2^{2/3} d}-\frac {a^{4/3} \log (\tan (c+d x))}{2 d}+\frac {3 a^{4/3} \log \left (\sqrt [3]{a}-\sqrt [3]{a+i a \tan (c+d x)}\right )}{2 d}-\frac {3 a^{4/3} \log \left (\sqrt [3]{2} \sqrt [3]{a}-\sqrt [3]{a+i a \tan (c+d x)}\right )}{2^{2/3} d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 4.35, size = 411, normalized size = 1.62 \begin {gather*} \frac {a e^{-\frac {2}{3} i (c+d x)} \sqrt [3]{1+e^{2 i (c+d x)}} \left (4 \sqrt {3} \text {ArcTan}\left (\frac {1+\frac {2 e^{\frac {2}{3} i (c+d x)}}{\sqrt [3]{1+e^{2 i (c+d x)}}}}{\sqrt {3}}\right )-2\ 2^{2/3} \sqrt {3} \text {ArcTan}\left (\frac {1+\frac {2 \sqrt [3]{2} e^{\frac {2}{3} i (c+d x)}}{\sqrt [3]{1+e^{2 i (c+d x)}}}}{\sqrt {3}}\right )-4 \log \left (1-\frac {e^{\frac {2}{3} i (c+d x)}}{\sqrt [3]{1+e^{2 i (c+d x)}}}\right )+2\ 2^{2/3} \log \left (1-\frac {\sqrt [3]{2} e^{\frac {2}{3} i (c+d x)}}{\sqrt [3]{1+e^{2 i (c+d x)}}}\right )-2^{2/3} \log \left (1+\frac {2^{2/3} e^{\frac {4}{3} i (c+d x)}}{\left (1+e^{2 i (c+d x)}\right )^{2/3}}+\frac {\sqrt [3]{2} e^{\frac {2}{3} i (c+d x)}}{\sqrt [3]{1+e^{2 i (c+d x)}}}\right )+2 \log \left (\frac {e^{\frac {4}{3} i (c+d x)}+e^{\frac {2}{3} i (c+d x)} \sqrt [3]{1+e^{2 i (c+d x)}}+\left (1+e^{2 i (c+d x)}\right )^{2/3}}{\left (1+e^{2 i (c+d x)}\right )^{2/3}}\right )\right ) \sqrt [3]{a+i a \tan (c+d x)}}{4 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.42, size = 0, normalized size = 0.00 \[\int \cot \left (d x +c \right ) \left (a +i a \tan \left (d x +c \right )\right )^{\frac {4}{3}}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.55, size = 233, normalized size = 0.92 \begin {gather*} \frac {2 \, \sqrt {3} 2^{\frac {1}{3}} a^{\frac {4}{3}} \arctan \left (\frac {\sqrt {3} 2^{\frac {2}{3}} {\left (2^{\frac {1}{3}} a^{\frac {1}{3}} + 2 \, {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{\frac {1}{3}}\right )}}{6 \, a^{\frac {1}{3}}}\right ) - 2 \, \sqrt {3} a^{\frac {4}{3}} \arctan \left (\frac {\sqrt {3} {\left (2 \, {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{\frac {1}{3}} + a^{\frac {1}{3}}\right )}}{3 \, a^{\frac {1}{3}}}\right ) + 2^{\frac {1}{3}} a^{\frac {4}{3}} \log \left (2^{\frac {2}{3}} a^{\frac {2}{3}} + 2^{\frac {1}{3}} {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{\frac {1}{3}} a^{\frac {1}{3}} + {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{\frac {2}{3}}\right ) - 2 \cdot 2^{\frac {1}{3}} a^{\frac {4}{3}} \log \left (-2^{\frac {1}{3}} a^{\frac {1}{3}} + {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{\frac {1}{3}}\right ) - a^{\frac {4}{3}} \log \left ({\left (i \, a \tan \left (d x + c\right ) + a\right )}^{\frac {2}{3}} + {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{\frac {1}{3}} a^{\frac {1}{3}} + a^{\frac {2}{3}}\right ) + 2 \, a^{\frac {4}{3}} \log \left ({\left (i \, a \tan \left (d x + c\right ) + a\right )}^{\frac {1}{3}} - a^{\frac {1}{3}}\right )}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 446 vs. \(2 (188) = 376\).
time = 1.16, size = 446, normalized size = 1.76 \begin {gather*} \frac {1}{2} \cdot 2^{\frac {1}{3}} \left (-\frac {a^{4}}{d^{3}}\right )^{\frac {1}{3}} {\left (i \, \sqrt {3} - 1\right )} \log \left (\frac {2 \cdot 2^{\frac {1}{3}} a \left (\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}\right )^{\frac {1}{3}} e^{\left (\frac {2}{3} i \, d x + \frac {2}{3} i \, c\right )} + 2^{\frac {1}{3}} {\left (i \, \sqrt {3} d - d\right )} \left (-\frac {a^{4}}{d^{3}}\right )^{\frac {1}{3}}}{2 \, a}\right ) + \frac {1}{2} \cdot 2^{\frac {1}{3}} \left (-\frac {a^{4}}{d^{3}}\right )^{\frac {1}{3}} {\left (-i \, \sqrt {3} - 1\right )} \log \left (\frac {2 \cdot 2^{\frac {1}{3}} a \left (\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}\right )^{\frac {1}{3}} e^{\left (\frac {2}{3} i \, d x + \frac {2}{3} i \, c\right )} + 2^{\frac {1}{3}} {\left (-i \, \sqrt {3} d - d\right )} \left (-\frac {a^{4}}{d^{3}}\right )^{\frac {1}{3}}}{2 \, a}\right ) + \frac {1}{2} \, \left (\frac {a^{4}}{d^{3}}\right )^{\frac {1}{3}} {\left (-i \, \sqrt {3} - 1\right )} \log \left (\frac {2 \cdot 2^{\frac {1}{3}} a \left (\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}\right )^{\frac {1}{3}} e^{\left (\frac {2}{3} i \, d x + \frac {2}{3} i \, c\right )} + {\left (i \, \sqrt {3} d + d\right )} \left (\frac {a^{4}}{d^{3}}\right )^{\frac {1}{3}}}{2 \, a}\right ) + \frac {1}{2} \, \left (\frac {a^{4}}{d^{3}}\right )^{\frac {1}{3}} {\left (i \, \sqrt {3} - 1\right )} \log \left (\frac {2 \cdot 2^{\frac {1}{3}} a \left (\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}\right )^{\frac {1}{3}} e^{\left (\frac {2}{3} i \, d x + \frac {2}{3} i \, c\right )} + {\left (-i \, \sqrt {3} d + d\right )} \left (\frac {a^{4}}{d^{3}}\right )^{\frac {1}{3}}}{2 \, a}\right ) + 2^{\frac {1}{3}} \left (-\frac {a^{4}}{d^{3}}\right )^{\frac {1}{3}} \log \left (\frac {2^{\frac {1}{3}} a \left (\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}\right )^{\frac {1}{3}} e^{\left (\frac {2}{3} i \, d x + \frac {2}{3} i \, c\right )} + 2^{\frac {1}{3}} \left (-\frac {a^{4}}{d^{3}}\right )^{\frac {1}{3}} d}{a}\right ) + \left (\frac {a^{4}}{d^{3}}\right )^{\frac {1}{3}} \log \left (\frac {2^{\frac {1}{3}} a \left (\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}\right )^{\frac {1}{3}} e^{\left (\frac {2}{3} i \, d x + \frac {2}{3} i \, c\right )} - \left (\frac {a^{4}}{d^{3}}\right )^{\frac {1}{3}} d}{a}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (i a \left (\tan {\left (c + d x \right )} - i\right )\right )^{\frac {4}{3}} \cot {\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 4.30, size = 369, normalized size = 1.45 \begin {gather*} \ln \left (-d\,{\left (\frac {a^4}{d^3}\right )}^{1/3}+a\,{\left (a\,\left (1+\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )\right )}^{1/3}\right )\,{\left (\frac {a^4}{d^3}\right )}^{1/3}+\ln \left (a\,{\left (a\,\left (1+\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )\right )}^{1/3}+2^{1/3}\,d\,{\left (-\frac {a^4}{d^3}\right )}^{1/3}\right )\,{\left (-\frac {2\,a^4}{d^3}\right )}^{1/3}+\frac {\ln \left (d\,{\left (\frac {a^4}{d^3}\right )}^{1/3}+2\,a\,{\left (a\,\left (1+\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )\right )}^{1/3}-\sqrt {3}\,d\,{\left (\frac {a^4}{d^3}\right )}^{1/3}\,1{}\mathrm {i}\right )\,\left (-1+\sqrt {3}\,1{}\mathrm {i}\right )\,{\left (\frac {a^4}{d^3}\right )}^{1/3}}{2}-\frac {\ln \left (d\,{\left (\frac {a^4}{d^3}\right )}^{1/3}+2\,a\,{\left (a\,\left (1+\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )\right )}^{1/3}+\sqrt {3}\,d\,{\left (\frac {a^4}{d^3}\right )}^{1/3}\,1{}\mathrm {i}\right )\,\left (1+\sqrt {3}\,1{}\mathrm {i}\right )\,{\left (\frac {a^4}{d^3}\right )}^{1/3}}{2}-\ln \left (2^{1/3}\,d\,{\left (-\frac {a^4}{d^3}\right )}^{1/3}-2\,a\,{\left (a\,\left (1+\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )\right )}^{1/3}+2^{1/3}\,\sqrt {3}\,d\,{\left (-\frac {a^4}{d^3}\right )}^{1/3}\,1{}\mathrm {i}\right )\,\left (\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )\,{\left (-\frac {2\,a^4}{d^3}\right )}^{1/3}+\ln \left (2\,a\,{\left (a\,\left (1+\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )\right )}^{1/3}-2^{1/3}\,d\,{\left (-\frac {a^4}{d^3}\right )}^{1/3}+2^{1/3}\,\sqrt {3}\,d\,{\left (-\frac {a^4}{d^3}\right )}^{1/3}\,1{}\mathrm {i}\right )\,\left (-\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )\,{\left (-\frac {2\,a^4}{d^3}\right )}^{1/3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________